const express = require('express');
const sha1 = require('sha1');
const app = express();
const config = require('./config');
const auth=require('./weichat/auth');
//router
const index=require('./routers/index');


//识别ejs代码
app.set('view engine','ejs');
app.set('views', './views');
//识别css样式,不引入将不知道外部样式表
app.use('/assets',express.static('assets'));

//router
app.use('/index',index);

//微信请求验证
app.use(auth());

app.listen(3000, () => {
    console.log(`Server started on port`);
});